package march.test_3_30;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class TestMain {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        String t = scanner.nextLine();
        int  min = myMin(s,t);
        List<String> list = getstring(s,t);
        for (int i = 0; i < list.size(); i++) {
            System.out.print(min + " ");
            System.out.println(list.get(i));
        }
    }
    public static int myMin(String s,String t) {
        int count = 0;
        int slen = s.length();
        for (int i = 0; i < slen; i++) {
            if(s.charAt(i) != t.charAt(i)) {
                count++;
            }
        }
        return count;
    }
    public static List<String> getstring(String s,String t){
        List<String> list = new ArrayList<>();
        int len = s.length();
        StringBuilder stringBuilder = new StringBuilder();
        for(int i = 0; i < len; i++) {
            if(s.charAt(i) != t.charAt(i)) {
                stringBuilder.append(s.charAt(i));
                list.add((i + 1) + " " + t.charAt(i));
            } else {
                if(stringBuilder.length() > 0) {
                    stringBuilder.setLength(0);
                }
            }
        }
        return list;
    }
}
